<?php /* Smarty version Smarty-3.1.8, created on 2012-06-15 00:35:32
         compiled from "tmpl/crud_template/controller_detail.html" */ ?>
<?php /*%%SmartyHeaderCode:4392177074fc491ac1c7cc0-04288477%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '7a7071f418e7bf5d22e232fe42aad7a6db80a322' => 
    array (
      0 => 'tmpl/crud_template/controller_detail.html',
      1 => 1339745427,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '4392177074fc491ac1c7cc0-04288477',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_4fc491ac2178e2_09354514',
  'variables' => 
  array (
    'controller' => 0,
    'foreign_table1' => 0,
    'foreign_key1' => 0,
    'foreign_self_key1' => 0,
    'foreign_table2' => 0,
    'foreign_key2' => 0,
    'foreign_self_key2' => 0,
    'foreign_table3' => 0,
    'foreign_key3' => 0,
    'foreign_self_key3' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_4fc491ac2178e2_09354514')) {function content_4fc491ac2178e2_09354514($_smarty_tpl) {?><<?php ?>?php

require("lib/Util.php");
require_once("<?php echo $_smarty_tpl->tpl_vars['controller']->value;?>
_helper.php");

$tpl_engine = get_tpl_engine();


$db = get_database_handler();

$detail = $db->peek(array("id"=>param_int("id")));
assign_hash($tpl_engine,$detail);

<?php if ($_smarty_tpl->tpl_vars['foreign_table1']->value){?>
$db->change_table("<?php echo $_smarty_tpl->tpl_vars['foreign_table1']->value;?>
");
$list1 = $db->peeks(array("<?php echo $_smarty_tpl->tpl_vars['foreign_key1']->value;?>
"=>$detail["<?php echo $_smarty_tpl->tpl_vars['foreign_self_key1']->value;?>
"]));
$tpl_engine->assign("list1",$list1);
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['foreign_table2']->value){?>
$db->change_table("<?php echo $_smarty_tpl->tpl_vars['foreign_table2']->value;?>
");
$list2 = $db->peeks(array("<?php echo $_smarty_tpl->tpl_vars['foreign_key2']->value;?>
"=>$detail["<?php echo $_smarty_tpl->tpl_vars['foreign_self_key2']->value;?>
"]));
$tpl_engine->assign("list2",$list2);
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['foreign_table3']->value){?>
$db->change_table("<?php echo $_smarty_tpl->tpl_vars['foreign_table3']->value;?>
");
$list3 = $db->peeks(array("<?php echo $_smarty_tpl->tpl_vars['foreign_key3']->value;?>
"=>$detail["<?php echo $_smarty_tpl->tpl_vars['foreign_self_key3']->value;?>
"]));
$tpl_engine->assign("list3",$list3);
<?php }?>

$tpl_engine->display('tmpl/<?php echo $_smarty_tpl->tpl_vars['controller']->value;?>
/detail.html');


?<?php ?>><?php }} ?>